/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>
#import "OFXObject.h"

@interface OFXApplication : OFXObject {
  NSString* applicationId;
  NSString* applicationVersion;
  NSString* language;
  NSString* clientUID;  
}

/** 
 * @property applicationId
 * @brief ID of client application, A-5
 *
 * Some servers may reject requests when they do not recognize the 
 * applicationId specified in the request.  As a result, it may be necessary
 * to spoof values of applicationId with well known clients such as Quicken(tm).
 */
@property(retain) NSString* applicationId;

/**
 * @property applicationVersion
 * @brief Version of client application, (6.00 encoded as 0600), N-4
 *
 * Some servers may reject requests when they do not recognize the
 * applicationVersion specified in the request.  As a result, it may be
 * necessary to spoof values of applicationVersion with well known clients
 * such as Quicken(tm).
 */
@property(retain) NSString* applicationVersion;

/**
 * @property language
 * @brief Requested language for text responses
 *
 * Most of the content in OFX is language-neutral. However, some error 
 * messages, balance descriptions, and similar elements contain text meant to 
 * appear to the financial institution customers. There are also cases, such 
 * as e-mail records, where customers need to send text in other languages. To 
 * support worldwide languages, OFX relies on standard XML mechanisms to encode
 * text.
 *
 * The encoding declaration of the standard XML declaration specifies the 
 * character set being used. Servers should respond to clients using the same 
 * encoding as was sent in the client’s request.
 *
 * Clients identify the language in the signon request. OFX specifies languages
 * by three-letter codes as definedinISO-639.  Servers report their supported
 * languages in the profile (see Chapter 7 of OFX 2.1 spec, "FIProfile").
 * If a server cannot support the language requested by the client, it must 
 * return an error and not process the rest of the transactions.
 */
@property(retain) NSString* language;

/**
 * @property clientUID
 * @brief Unique ID identifying OFX client, A-36
 *
 * OFX servers can require OFX clients to include a client ID in each signon 
 * request. This client ID should be unique to the installation of the client 
 * software, but the method that the ID is generated is left up to the client. 
 * The server can specify that this field is required using the <CLIENTUIDREQ> 
 * tag in the applicable <SIGNONINFO> section of the profile. Servers should 
 * expect that users may connect via OFX from multiple locations and may need 
 * to associate more than one <CLIENTUID> value with their <USERID>.
 * 
 * The client may make this value user discoverable, so that the user can 
 * register the client ID with financial institutions.
 */
@property(retain) NSString* clientUID;  

- (id)init;

@end
